<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="../internal.js"></script>
<style type="text/css">
.warp {
	width: 320px;
	height: 153px;
	margin-left: 5px;
	padding: 20px 0 0 15px;
	position: relative;
}

#url {
	width: 290px;
	margin-bottom: 2px;
	margin-left: -6px;
	margin-left: -2px\9;
	*margin-left: 0;
	_margin-left: 0;
}

.format span {
	display: inline-block;
	width: 58px;
	text-align: center;
	zoom: 1;
}

table td {
	padding: 5px 0;
}

#align {
	width: 65px;
	height: 23px;
	line-height: 22px;
}
</style>
</head>
<body>
	<div class="warp">
		<table width="300" cellpadding="0" cellspacing="0">
			<tr>
				<td colspan="2" class="format">
							<textarea id="url" type="text" value="" rows="7" ></textarea>
			</tr>

		</table>
	</div>
	<script type="text/javascript">
    var iframe = editor._iframe;
    if(iframe){
        $G("url").value = iframe.getAttribute("src")||"";
        $G("width").value = iframe.getAttribute("width")||iframe.style.width.replace("px","")||"";
        $G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px","") ||"";
        $G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
        $G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
        $G("align").value = iframe.align ? iframe.align : "";
    }
    function queding(){
        var  url = $G("url").value.replace(/^\s*|\s*$/ig,"");
        if(!url){
            alert(lang.enterAddress);
            return false;
        }
        url = url.replace(/width="(\d*)"\s+height="(\d*)" /g,'');
        editor.execCommand("inserthtml",url);
        editor._iframe = null;
        dialog.close();
    }
    dialog.onok = queding;
    $G("url").onkeydown = function(evt){
        evt = evt || event;
        if(evt.keyCode == 13){
            queding();
        }
    };
    $focus($G( "url" ));

</script>
</body>
</html>